home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / FSIZE.HDR < prev    next >
Text File  |  1994-04-25  |  1KB  |  51 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _FSize( xFile ) --> nFileSize
  8.  
  9. PARAMETERS:
  10.  
  11. xFile: file name *OR* handle
  12.  
  13. SHORT:
  14.  
  15. Determine the size of a file.
  16.  
  17. DESCRIPTION:
  18.  
  19. _FSize() returns the size of the specified file in bytes.
  20.  
  21. If xFile is of type char, then _FSize() assumes a file name of a file TO
  22. BE OPENED.  If the file is already open, then pass the file handle returned
  23. by a previous call to Clipper's fopen() function.
  24.  
  25. If you specify a file handle of an already open file, the file pointer
  26. is reset to it's original position when _FSize() returns.
  27.  
  28. If you specify a file handle that is not valid, the result is unpredictable.
  29.  
  30. If you specify a file that does not exist, -1 is returned.
  31.  
  32. If you fail to specify xFile, the return value is -1.
  33.  
  34. If you specify a file name that cannot be opened, the return value is -1.
  35.  
  36. NOTE:
  37.  
  38. _FSize() is a legacy function - written before directory() was introduced in
  39. version 5.x of Clipper.
  40.  
  41. Nevertheless, _FSize() is less trouble, doing away with the need to create
  42. an array simply to get the file size of a single file.
  43.  
  44. EXAMPLE:
  45.  
  46. EXAMPLE: LOCAL t := _FSize('TEST.DAT')
  47.  
  48. Result: t = 50887 //size of TEST.DAT
  49.  
  50. ******************************************************************************/
  51.